#!/usr/bin/env sh

set -ue

SCRIPT_PATH=$(cd "$(dirname "$0")" && pwd)
CMAKE_PATH=$SCRIPT_PATH/../..
BUILD_PATH=$SCRIPT_PATH/../build/proj_xcode
THIRD_PARTY_DIR=$SCRIPT_PATH/../../../thirdParty
CMAKE_TOOLCHAIN_FILE=$THIRD_PARTY_DIR/cocos2d/cmake/ios.toolchain.cmake

# Run CMake.
cmake -S "$CMAKE_PATH" \
  -B "${BUILD_PATH}_iphoneos" \
  -G Xcode \
  -D IOS_PLATFORM=OS \
  -D CMAKE_TOOLCHAIN_FILE="$CMAKE_TOOLCHAIN_FILE"
